﻿namespace Core
{
    public class MessageHandlerPublicSystem : EntitySystem, IAwake
    {
        public void Awake()
        {
            Subscribe<HandleMessage>(HandleMessage);
        }

        private void HandleMessage(ref HandleMessage eventData)
        {
            ((IEventData)eventData.message).Publish();
        }
    }
}
